
import type { App } from "vue";

export function initProjectLogics(app: Nullable<App<Element>>) {

  //初始化钩子
  initHooks();

  //注册全局组件
  useAppCommon(app);

}

function initHooks() {
  //初始化themeHooks
}

function useAppCommon(app: Nullable<App<Element>>) {
  const modules = import.meta.glob("../common/**/index.tsx", { eager: true });
  console.log(modules)
  for (let module of Object.values(modules)) {
    let val = (module as any).default;
    if (val.name) {
      app?.component(val.name, val);
    }
  }
}

